package jp.eisbahn.mgapi.auth;

import java.io.IOException;

import javax.servlet.http.HttpServletResponse;

public class Authorization {

    public void redirect(HttpServletResponse response, ClientConfig config,
            String[] scopes, String display, Device device) throws IOException {
        String url = new AuthorizationUrlBuilder()
                .setClientConfig(config)
                .setScopes(scopes)
                .setDisplay(display)
                .setDevice(device)
                .build();
        response.sendRedirect(url);
    }

}
